#pragma once
#include <iostream>
#include <vector>
#include <string>
#include <arpa/inet.h>
#include <json/json.h>


#ifndef __ControlMsg__
#define __ControlMsg__

class ControlMsg {
public:
	ControlMsg();
	ControlMsg(int);
	ControlMsg(int, std::string);
	friend std::ostream & operator<<(std::ostream & os, const ControlMsg& msg);
public:
	int droneNumber;
	std::vector<double> position;
	std::string mode;
};



std::ostream & operator<<(std::ostream & os, const ControlMsg & msg)
{
	os << "droneNumber is:" << msg.droneNumber << std::endl;
	os << "mode is:" << msg.mode << std::endl;
	os << "position is:(" << msg.position[0] << "," << msg.position[1] << "," << msg.position[2] << ")" << std::endl;
	return os;
}

ControlMsg::ControlMsg()
{
	droneNumber = -1;
	position = std::vector<double>(3, 0);
	mode = "";
}

ControlMsg::ControlMsg(int drone_number)
{
	droneNumber = drone_number;
	position = std::vector<double>(3, 0);
	mode = "";
}

ControlMsg::ControlMsg(int drone_number, std::string setMode)
{
	droneNumber = drone_number;
	position = std::vector<double>(3, 0);
	mode = setMode;
}

#endif
